import request from '@/utils/request'

// 查询用药记录列表
export function listRecords(query) {
  return request({
    url: '/business/medication/list',
    method: 'get',
    params: query
  })
}

// 查询用药记录详细
export function getRecords(id) {
  return request({
    url: '/business/medication/' + id,
    method: 'get'
  })
}

// 新增用药记录
export function addRecords(data) {
  return request({
    url: '/business/medication',
    method: 'post',
    data: data
  })
}

// 修改用药记录
export function updateRecords(data) {
  return request({
    url: '/business/medication',
    method: 'put',
    data: data
  })
}

// 删除用药记录
export function delRecords(id) {
  return request({
    url: '/business/medication/' + id,
    method: 'delete'
  })
}
// 查询用药老人列表
export function nurseElderList(query) {
  return request({
    url: '/business/nurse/elderList',
    method: 'get',
    params: query
  })
}

export function nurseMedicationFinish(query) {
  return request({
    url: '/business/elder/medication/finish',
    method: 'get',
    params: query
  })
}
